<?php
 include "counter2.php";
?>
<?php pagestart();
pagehead(_("Accounting for monetary contributions"));
?>
<BODY bgcolor="white">
<?php pagetop(_("Accounting for monetary contributions")) ?>

<!-- Main content goes here -->
<?php print _("This page lists contributions of money to the Linux Counter project.") ?>
<h2><?php print _("Collection for a new front-end machine") ?></h2>
<p><?php print _("In December 2004, Harald Alvestrand bought a new machine for the Linux Counter project.") ?></p>
<p><?php print _("The cost of this machine was NOK 5.072 (approximately USD 822, EUR 615). The following contributions have been received so far:") ?></p>
<?php
# Rates of exchange from Norges Bank, Feb 6, 2005
$exchange['USD'] = 6.39;
$exchange['EUR'] = 8.29;
$exchange['PLN'] = 2.083;
$exchange['CAD'] = 5.1635;

# Array elms: 0 - Date, 1 - Name, 2 - Currency, 3 - Amount, 4 - Fee
# currency of fee is assumed to be same as of amount.
$contrib[] = array('2005-01-04', 'Harald Alvestrand', 'USD', '10');
$contrib[] = array('2005-01-05', 'Paul Isitt', 'USD', '20');
$contrib[] = array('2005-01-05', 'Arthur Corliss', 'USD', 25);
$contrib[] = array('2005-01-06', 'Marcin Sochacki', 'PLN', 14.85);
$contrib[] = array('2005-01-18', 'Patrick Reijnen', 'EUR', 20);
$contrib[] = array('2005-01-18', 'Marko Lorentz', 'USD', 10);
$contrib[] = array('2005-01-18', 'Merle Watts', 'USD', 10);
$contrib[] = array('2005-01-21', 'Ric Johnson', 'USD', 10);
$contrib[] = array('2005-01-30', 'Victoriano Giralt Garcia', 'USD', 15, 0.89);
$contrib[] = array('2005-01-31', 'Herbert Schwappacher', 'USD', 10, 0.69);
$contrib[] = array('2005-02-02', 'Florian Jenn', 'USD', 5, 0.5);
$contrib[] = array('2005-02-02', 'Rodney Myers', 'USD', 10, 0.69);
$contrib[] = array('2005-02-02', 'Manfred Rieser', 'USD', 30, 1.47);
$contrib[] = array('2005-02-03', 'Philip Romov', 'USD', 10, 0.69);
$contrib[] = array('2005-02-03', 'Gerard Henri Pille', 'EUR', 50, 0.50); # moneybookers charged 0.50 for him moving money to them
$contrib[] = array('2005-02-05', 'Graham Murray', 'USD', 15, 0.89);
$contrib[] = array('2005-02-05', 'Philipp Nyffenegger', 'EUR', 10, 0.74 );
$contrib[] = array('2005-02-05', 'Michael Bartlett', 'USD', 10, 0.69);
$contrib[] = array('2005-02-06', 'Steve Herber', 'USD', 10, 0.69);
$contrib[] = array('2005-02-08', 'Norbert Hoehn', 'USD', 10, 0.69);
$contrib[] = array('2005-02-15', 'Arvid Nornes', 'USD', 15, 0.81);
$contrib[] = array('2005-02-16', 'John Robinson', 'USD', 20, 1.08);
$contrib[] = array('2005-02-16', 'Volker Knieling', 'USD', 5, 0.50);
$contrib[] = array('2005-02-17', 'Thomas Ellis', 'USD', 10, 0.69);
$contrib[] = array('2005-02-19', 'Digital Mapping Systems', 'CAD', 20, 1.33);
$contrib[] = array('2005-02-20', 'Mike Evans', 'USD', 15, 0.89);
$contrib[] = array('2005-02-21', 'Erkki Ruohtula', 'USD', 20, 1.08);
$contrib[] = array('2005-02-22', 'Anthony Randell', 'USD', 20, 1.08);
$contrib[] = array('2005-02-25', 'Available.be', 'USD', 10, 0.69);
$contrib[] = array('2005-02-25', 'Sandor Barany', 'EUR', 10, 0.1); # mb
$contrib[] = array('2005-02-27', 'Charles Rutledge', 'USD', 10, 0.69);
$contrib[] = array('2005-03-05', 'Steve Kist', 'USD', 10, 0.69);
$contrib[] = array('2005-03-09', 'James Windmiller', 'USD', 50, 2.25);
$contrib[] = array('2005-03-11', 'Francois Berthe', 'EUR', 10, 0.1); # mb
$contrib[] = array('2005-03-13', 'Victor Hammersley', 'USD', 15, 0.89);
$contrib[] = array('2005-03-16', 'Todd Pardi', 'USD', 10, 0.69);
$contrib[] = array('2005-03-17', 'Roger Miller', 'USD', 10, 0.69);
$contrib[] = array('2005-03-20', 'Thomas Heuving', 'USD', 15, 0.89);
$contrib[] = array('2005-04-07', 'James Linden', 'USD', 20, 1.08);
$contrib[] = array('2005-04-07', 'Nikolaj Petersen', 'USD', 80, 3.42);
$contrib[] = array('2005-04-08', 'Bruce Dawson', 'USD', 60, 2.64);
$contrib[] = array('2005-04-09', 'Joachim Hofmueller', 'USD', 20, 1.08);
$contrib[] = array('2005-04-12', 'Jean-Michel Chastagnier', 'USD', 20, 1.08);
$contrib[] = array('2005-04-17', 'Philip Goembel', 'USD', 15, 0.89);
$contrib[] = array('2005-04-19', 'Reinhard Lehar', 'USD', 20, 1.08);
$contrib[] = array('2005-04-19', 'Adam Golebiewski', 'PLN', 30, 0.30);
$contrib[] = array('', '', 'USD', 0, 0);


print "<table>\n";
print "<tr align=\"left\"><th>Date<th align=\"left\">Contributor<th>Sum<th>NOK\n
";
foreach ($contrib as $elm) {
  if ($elm[3] == 0) { continue; }
  print "<tr><td>" . $elm[0] . "<td>" . $elm[1];
  print "<td>" . $elm[2] . " " . $elm[3];
  $nok =  $elm[3] * $exchange[$elm[2]];
  print "<td align=\"right\">" . intval($nok);
  $total += $nok;
  $fees += $elm[4] * $exchange[$elm[2]];
  print "\n";
}
print "<tr><th align=\"left\">" . _("TOTAL") . "<td><td><th align=\"right\">" . intval($total) . "\n";
print "</table>\n<br>\n";
print _("So far") . ", NOK " . intval($fees) . " " . _("has been paid to PayPal and MoneyBookers in transaction fees.");

$total -= $fees;

$percentage = $total * 100 / 5072;
if ($percentage < 100) {
   print "<p>" . sprintf(_("Less transaction fees") . ", %5.1f%% " . _("of the new machine is now paid for") . ".\n", $percentage);
} else {
   print "<p>" . _("All of the new machine, and the transaction fees, has now been paid for. Thank you") . "!\n";
}
?>

<p><?php print _("Further contributions can be sent via PayPal or MoneyBookers - account") . emailCloaking("harald@alvestrand.no") ?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="harald@alvestrand.no">
<input type="hidden" name="item_name" value="Linux Counter machine collection">
<input type="hidden" name="item_number" value="gimel">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
<!-- Begin moneybookers button code -->
<a href="http://www.moneybookers.com/" target="_blank">
<img style="border-width: 1px; border-color: #8B8583;" src="http://www.moneybookers.com/images/banners/88_en_mb.gif" alt="" width=88 height=31 border=0>
</a>
<p>&nbsp;</p>
<?php pagebottom("yes") ?>
</body>
</html>
